{% extends 'layout.html' %} 
{% block main %}
<div class="table_content">
    <div class="table_content_head pd_b20 pd_t20 clear">
        <a href="/admin/article/add" class="small_btn orange_color fr">添加</a>
        <!-- <ul class="check_list clear fr mr_r20">
            <li class="checkbox_input" onclick="checkRadio(this);"><span class="check_btn icon"></span><input name="showAll" type="checkbox" value="" />显示全站内容</li>
        </ul> -->
    </div>
    <table class="table table-hover table-bordered">
        <thead>
            <tr>
                <th>id</th>
                <th>标题</th>
                <th>作者</th>
                <th>所属分类</th>
                <th>概要</th>
                <th>点击量</th>
                <th>发布时间</th>
                <!-- <th>文章内容</th> -->
                <th width="90">操作</th>
            </tr>
        </thead>
        <tbody>
            {% if articles.length > 0 %}
                {% for article in articles %}
                <tr>
                    <td>{{article.id}}</td>
                    <td>{{article.title}}</td>
                    <td>{{article.author}}</td>
                    <td>{{article.tags}}</td>
                    <td>{{article.summary}}</td>
                    <td>{{article.views}}</td>
                    <td>{{(article.post_time*1000)|date('Y-m-d H:i:s',-8*60)}}</td>
                    <td><a href="/admin/article/edit?id={{article.id}}">修改</a> | <a onclick="confirmAlert('确认要删除吗','/admin/article/del?id={{article.id}}');" href="javascript:;">删除</a></td>
                </tr>
                {% endfor %}
            {% else %}
                <tr>
                    <td colspan="8" align="center">暂时还没有文章信息哦</td>
                </tr>
            {% endif %}
        </tbody>
    </table>
    {% include 'page.html' %}
</div>
{% endblock %}
